export const getUserData = () => {
    if (document.cookie) {
        let arr = document.cookie.split("; ");
        interface objData {
            account: any;
            [key: string]: string;
        }
        let obj: objData = {
            account: "",
        };
        arr.forEach((item) => {
            let keyName = item.split("=")[0];
            let keyVal = item.split("=")[1];
            obj[keyName] = keyVal;
        });
        if (obj.account) {
            return obj.account;
        }
    } else {
        return {
            account: "没有登录",
        };
    }
};
